package com.ctshk.rpc.bus.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ctshk.common.req.MainData;
import com.ctshk.rpc.bus.entity.BusLineStops;

/**
 * <p>
 * 巴士线路站点关联表 Mapper 接口
 * </p>
 *
 * @author 彭柳霖
 * @since 2021-02-08
 */
public interface BusLineStopsMapper extends BaseMapper<BusLineStops> {

	/**
	 * 查询某路线的站点列表
	 * @param lineId
	 * @return
	 */
	@Select("select ts.id as value, ts.site_name as label from t_bus_line_stops t left join t_bus_stops ts on ts.id = t.stops_id where ts.is_deleted = 0 and t.line_id = #{lineId}")
	List<MainData> queryDictListByLine(Long lineId);
}
